package com.personalblog.service;

import com.personalblog.dto.BlogQuery;
import com.personalblog.po.Blog;
import com.personalblog.po.Tag;
import com.personalblog.po.User;

import java.util.List;
import java.util.Map;

/**
 * @author jxau_scf
 * @date 2021/3/24 - 18:59
 */
public interface BlogService {
    int insertBlog(Blog blog);
    int deleteBlog(int blogId);
    int updateBlog(int blogId,Blog blog);
    Blog findBlogById(int blogId);
    List<Blog> findBlogs();
    List<Blog> findBlogsByTagId(int tagId);
    List<Blog> findBlogsByTypeId(int typeId);
    List<Blog> findBlogsByBlogQuery(BlogQuery blogQuery);
    int findBlogCount();
    List<Blog> findBlogsOrderByUpdateTime(int pageSize);
    List<Blog> findBlogsByKeywordQuerySearch(String query);
    Blog getAndConvert(int blogId);
    public Map<String,List<Blog>> archiveBlog();
    //Blog findBlogFetchType(int blogId);
//    int insertBlogTag(Blog blog);
}
